<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE HTML>

<html xmlns="http://www.w3.org/1999/xhtml">

	<head>

		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

		<title><?php echo C('WEB_TITLE');?></title>

		<link rel="stylesheet" type="text/css" href="/Public/css/common.css"/>

		<link rel="stylesheet" type="text/css" href="/Public/js/layui/css/layui.css" media="all"/>

		<link rel="stylesheet" href="/Public/js/datepicker/datepicker.css"/>

		<link rel="stylesheet" type="text/css" href="/Public/crm/css/index.css"/>

		<link rel="stylesheet" type="text/css" href="/Public/crm/css/style.css"/>

		<link rel="stylesheet" href="<?php echo C('PC_ICON_HTTP');?>">

		<script type="text/javascript" >

			const moduleName = "<?php echo (MODULE_NAME); ?>";

		</script>

        <link rel="stylesheet" href="/Public/js/viewer/css/viewer.min.css">
		
		<link rel="stylesheet" type="text/css" href="/Public/js/select2/select2.css" media="all"/>

		<script type="text/javascript" src="/Public/js/jquery-1.9.1.min.js"></script>
		
		<script type="text/javascript" src="/Public/js/jquery-ui.min.js"></script>

		<script type="text/javascript" src="/Public/js/cookie/jquery.cookie.js"></script>

		<script type="text/javascript" src="/Public/js/lang/<?php echo (getStrToLower(cookie('think_language'))); ?>.js"></script>

		<script type="text/javascript" src="/Public/js/colorpicker.js"></script>

		<script type="text/javascript" src="/Public/js/layer/layer.js"></script>

		<script type="text/javascript" src="/Public/js/layui/layui.js"></script>

        <script type="text/javascript" src="/Public/js/feeldesk.js"></script>

        <script type="text/javascript" src="/Public/crm/js/index.js"></script>

        <script type="text/javascript" src="/Public/js/jquery.nicescroll.js"></script>

		<script type="text/javascript" src="/Public/js/clipboard.min.js"></script>

		<script type="text/javascript" src="/Public/js/select2/select2.min.js"></script>

		<script type="text/javascript" src="/Public/js/select2/jquery.core.js"></script>

	</head>

<body>

<script type="text/javascript" src="/Public/js/datepicker/datepicker.all.js"></script>

<script type="text/javascript" src="/Public/js/datepicker/moment.min.js"></script>

<script type="text/javascript" src="/Public/js/datepicker/datepicker.en.js"></script>

    <div class="fd-right-main">

        

<div class="hidden hg100 layui-form" id="Memberlist">

	<div class="feeldesk-form pd0 feelcrm-form">

		<div class="layui-tab">

			<ul class="layui-tab-title">

				<li class="tab-title-name"><?php echo L('USER_LIST');?></li>

				<li class="tab-title-btn">

					<a href="javascript:void(0);" id="memberDetailLay" class="layui-btn layui-btn-normal titleSubmit"><?php echo l('SUBMIT');?></a>

					<a href="javascript:closeLayerAll();" class="layui-btn layui-btn-normal titleCancel"><?php echo l('CANCEL');?></a>

					<div class="clear"></div>

				</li>

				<form1 action="" class="fr selectMemberForm" method="get">

					<div class="compact-search">

						<i class="iconfont icon-search"></i>

						<input type="text" name="selectMemberKeyword" value="" placeholder="<?php echo L('NAME1');?>/<?php echo L('CELL_PHONE');?>"/>

						<a href="javascript:" class="selectMemberBtn"><?php echo L('SEARCH');?></a>

					</div>

				</form1>

			</ul>

		</div>

	</div>

	<div class="feelcrm-list">

		<table class="layui-table" lay-skin="line">

			<thead>

				<tr>

					<th></th><th><?php echo L('NAME');?></th><th><?php echo L('EMAIL');?></th><th><?php echo L('MOBILE');?></th><th><?php echo L('SUBORDINATE_SECTOR');?></th><th><?php echo L('ROLE');?></th>

				</tr>

			</thead>

			<tbody id="member-detail">

				<?php if(empty($member)): ?><tr class="nodata center">

						<td colspan="11">

							<p><i class="iconfont icon-nothing fts20"></i></p>

							<p><?php echo L('NO_DATA');?></p>

						</td>

					</tr>

				<?php else: ?>

					<?php if(is_array($member)): $i = 0; $__LIST__ = $member;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vo): $mod = ($i % 2 );++$i;?><tr>

							<td><input type="radio" value="<?php echo encrypt($vo['member_id'],'MEMBER');?>" name="member" lay-skin="primary" /></td>

							<td><?php echo ($vo["name"]); ?></td>

							<td><?php echo ($vo["email"]); ?></td>

							<td><?php echo ($vo["mobile"]); ?></td>

							<td><?php echo CrmgetMemberGroupName($groupList,$vo['group_id']);?></td>

							<td><?php echo ($roleList[$vo['role_id']]['role_name']); ?></td>

						</tr><?php endforeach; endif; else: echo "" ;endif; endif; ?>

			</tbody>

		</table>

		<div class="right-list-page clearfix"><div class="feeldesk-page"><?php echo ($memberPage); ?></div></div>

	</div>

</div>

<script>

	$('input[name="selectMemberKeyword"]').unbind('keyup').keyup(function (e)
	{
		e.stopPropagation();

		if (e.keyCode == 13)
		{
			searchSelectMemberList();

			return false;
		}
	});

	$('.selectMemberBtn').unbind('click').bind('click',function(){

		searchSelectMemberList();

		return false;
	})

	function searchSelectMemberList()
	{
		var keyword = $('input[name="selectMemberKeyword"]').val();

		$.ajax({
			url:"<?php echo U('AjaxRequest/getMemberList');?>",
			type:'get',
			data:{'sMemberKeyword':keyword},
			async: false,
			datatype:'json',
			success:function(data)
			{

				$('#member-detail').html(data.html);

				$('#Memberlist .feeldesk-page').html(data.page);

				layui.use('form', function() {

					var form = layui.form; //只有执行了这一步，部分表单元素才会自动修饰成功

					form.render();

				});

				$('#Memberlist .feeldesk-page a').click(function()
				{
					pageclick(this);

					return false;
				})

			},
			error:function()
			{
				layer.msg("<?php echo L('FAILED_TO_ACQUIRE_USER');?>");
			}
		});
	}

</script>


<script>

	$(function(){

		$('#Memberlist .feeldesk-page a').click(function(){

			pageclick(this,'/Opportunity/detail');

			return false;
		})

	})

</script>

<div class="comment-shade"></div>

<div class="comment-panel hidden" id="comment">

	<header><span><?php echo L('COMMENT');?></span><i class="iconfont icon-guanbi comment-close" title="<?php echo L('CLOSE');?>"></i></header>

	<form action="<?php echo U('Customer/commentFollow');?>" id="commentForm" class="layui-form">

		<input type="hidden" name="comment[follow_id]" id="commentFollowId"/>

		<textarea id='commentEditor' name="comment[content]" cols="30" rows="10" placeholder="<?php echo L('ENTER_COMMENT_CONTENT');?>"></textarea>

		<div class="submit-comment"><a href="javascript:" class="layui-btn"><?php echo L('SUBMIT');?></a></div>

	</form>

</div>

<div class="hidden hg100 div-layerframe feeldesk-form layui-form" id="LoseCust">

	<div class="feeldesk-form pd0 feelcrm-form">

		<div class="layui-tab">

			<ul class="layui-tab-title">

				<li class="tab-title-name"><?php echo L('CUSTOMER_LOST_ORDER');?></li>

				<li class="tab-title-btn">

					<a href="javascript:loseCustomer('<?php echo U('opportunity/lose');?>','<?php echo L('LOST_ORDER');?>','<?php echo encrypt($opportunity['opportunity_id'],'OPPORTUNITY');?>')" class="layui-btn layui-btn-normal titleSubmit"><?php echo l('SUBMIT');?></a>

					<a href="javascript:closeLayerAll();" class="layui-btn layui-btn-normal titleCancel"><?php echo l('CANCEL');?></a>

					<div class="clear"></div>

				</li>

			</ul>

		</div>

	</div>

	<div class="form-content">

		<div class="form-item pb25 pt100 create-both-end">

			<div class="layui-form-item">

				<label class="layui-form-label">

					<?php echo L('REASON_FOR_LOSS');?>

				</label>

				<div class="layui-input-inline">

					<select name="lose_id" id="lose_id" lay-ignore>

						<option value=""><?php echo L('REASON_FOR_LOSS');?></option>

						<?php if(is_array($loses)): $i = 0; $__LIST__ = $loses;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$v): $mod = ($i % 2 );++$i;?><option value="<?php echo ($v["lose_id"]); ?>" title="<?php echo ($v["lose_name"]); ?>"><?php echo ($v["lose_name"]); ?></option><?php endforeach; endif; else: echo "" ;endif; ?>

					</select>

					<script>

						$("#lose_id").select2();

					</script>

				</div>

				<i class="layui-icon layui-icon-about intro-icon" data-note="<?php echo L('ENTER_NAME_SEARCH');?>"></i>

			</div>

			<div class="layui-form-item">

				<label class="layui-form-label">

					<?php echo L('COMPETITOR');?>

				</label>

				<div class="layui-input-inline">

					<select name="competitor_id" id="competitor_id" lay-ignore>

						<option value=""><?php echo L('CHOOSE'); echo L('COMPETITOR');?></option>

						<?php if(is_array($competitor)): $i = 0; $__LIST__ = $competitor;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$v): $mod = ($i % 2 );++$i;?><option value="<?php echo ($v["competitor_id"]); ?>" title="<?php echo ($v["detail"]["name"]); ?>"><?php echo ($v["detail"]["name"]); ?></option><?php endforeach; endif; else: echo "" ;endif; ?>

					</select>

					<script>

						$("#competitor_id").select2();

					</script>

				</div>

				<i class="layui-icon layui-icon-about intro-icon" data-note="<?php echo L('ENTER_NAME_SEARCH');?>"></i>

			</div>

		</div>

	</div>

</div>

<div class="customer-detail feeldesk-form pd0 feelcrm-form">

    <div class="customer-detail-content">

        <div class="detail-sidebar sidebar" id="closeCustomerDetail"><i class="iconfont icon-right"></i></div>

		<div class="customer-header h-auto">

			<div class="customer-header-name"><span class="iconfont icon-dingdanxiangqing blue8"></span><?php echo ($opportunity["opportunity_prefix"]); echo ($opportunity["opportunity_no"]); ?></div>

			<div class="customer-header-right">

				<?php if(($detailtype) == "index"): if(($opportunity["isvalid"]) == "1"): echo FEELCRM('Opportunity/edit',['id'=>encrypt($opportunity['opportunity_id'],'OPPORTUNITY'),'detailtype'=>encrypt('index','OPPORTUNITY')],L('EDITOR'),'feelcrm-commbtn ml5');?>

						<!--<?php if(!empty($istransferOpportunityAuth)): ?><a href="javascript:" class="chooseMemberDetail feelcrm-commbtn ml5" data-id="<?php echo encrypt($opportunity['opportunity_id'],'OPPORTUNITY');?>" data-href="<?php echo U('Opportunity/transfer');?>" data-name="<?php echo L('TRANSFER');?>" ><?php echo L('TRANSFER');?></a><?php endif; ?>-->

					<?php else: ?>

						<?php echo FEELCRM('Recover/re_opportunity',['id'=>encrypt($opportunity['opportunity_id'],'OPPORTUNITY')],L('RECOVERY'),'feelcrm-commbtn ml5','batch'); endif; ?>

					<?php echo FEELCRM('Opportunity/delete',['id'=>encrypt($opportunity['opportunity_id'],'OPPORTUNITY'),'detailtype'=>encrypt('index','OPPORTUNITY')],L('DELETE'),'feelcrm-commbtn ml5','trash'); endif; ?>

				<?php if(($detailtype) == "contract"): echo FEELCRM('Contract/create',['id'=>encrypt($opportunity['opportunity_id'],'OPPORTUNITY'),'detailtype'=>encrypt('contract','OPPORTUNITY')],L('ADD_CONTRACT'),'feelcrm-commbtn'); endif; ?>

			</div>

			<div class="clear"></div>

			<div class="customer-system-info">

				<div class="fl customer-system-info-nav" ><p class="system-nav-tit"><?php echo L('SUBORDINATE_SECTOR');?></p><p class="system-nav-con"><?php echo CrmgetMemberGroupName($groupList,$opportunity['group_id']);?></p></div>
				<div class="fl customer-system-info-nav" ><p class="system-nav-tit"><?php echo L('LEADER');?></p><p class="system-nav-con blue8"><?php echo ((isset($opportunity["member_name"]) && ($opportunity["member_name"] !== ""))?($opportunity["member_name"]):'<span class="iconfont icon-nothing gray1"></span>'); ?></p></div>
				<div class="fl customer-system-info-nav" ><p class="system-nav-tit"><?php echo L('FINAL_FOLLOW-UP');?></p><p class="system-nav-con"><?php echo (getDates($opportunity["lastfollowtime"])); ?></p></div>
				<div class="fl customer-system-info-nav" ><p class="system-nav-tit"><?php echo L('NEXT_CONTACT_TIME');?></p><p class="system-nav-con"><?php echo (getDates($opportunity["nextcontacttime"])); ?></p></div>
				<div class="fl customer-system-info-nav" ><p class="system-nav-tit"><?php echo L('CREATE_TIME');?></p><p class="system-nav-con"><?php echo (getDates($opportunity["createtime"])); ?></p></div>
				<div class="fl customer-system-info-nav" ><p class="system-nav-tit"><?php echo L('FOUNDER');?></p><p class="system-nav-con"><?php echo ($opportunity["creater_name"]); ?></p></div>
				<div class="fl customer-system-info-nav" ><p class="system-nav-tit"><?php echo L('ENTRY_METHOD');?></p><p class="system-nav-con"><?php echo getCrmEntryMethod($opportunity['entry_method']);?></p></div>

			</div>

			<div class="clear"></div>

			<div class="opportunity-stage">

				<div class="opportunity-stage-li">

					<?php if(is_array($opportunityStageForm["stage_list"])): $i = 0; $__LIST__ = $opportunityStageForm["stage_list"];if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vo): $mod = ($i % 2 );++$i;?><div class="opportunity-stage-list <?php if(!empty($isEditOpportunityAuth)): if(($opportunity["is_losed"]) != "1"): if(($opportunity["detail"]["stage"]) != $vo["value"]): ?>opportunity-stage-btn<?php endif; endif; endif; ?> <?php if(($opportunityStageForm["stage_end"]["is_already"]) != "1"): if(($opportunity["detail"]["stage"]) == $vo["value"]): ?>active<?php else: if(($vo["is_already"]) == "1"): ?>already<?php endif; endif; endif; ?>" data-value="<?php echo ($vo["value"]); ?>"><?php if(($vo["is_already"]) == "1"): ?><!--<i class="iconfont icon-system-success"></i>--><?php endif; echo ($vo["value"]); ?></div><?php endforeach; endif; else: echo "" ;endif; ?>

				</div>

				<?php if(!empty($isLoseCustomerAuth)): ?><!--商机阶段为赢单时，不显示-->
					<?php if(!empty($opportunityStageForm["stage_end"]["value"])): ?><div class="opportunity-stage-end <?php if(($opportunityStageForm["stage_end"]["is_already"]) == "1"): ?>active<?php endif; ?>" data-value="<?php echo ($opportunityStageForm["stage_end"]["value"]); ?>" data-id="<?php echo encrypt($opportunity['opportunity_id'],'OPPORTUNITY');?>" data-href="<?php echo U('opportunity/lose');?>" <?php if(($opportunity["is_losed"]) != "1"): ?>id="loseCustomer"<?php endif; ?>><i class="iconfont icon-guanbi-02-02"></i><?php echo ($opportunityStageForm["stage_end"]["value"]); ?></div><?php endif; endif; ?>

			</div>

		</div>

		<script type="text/javascript">

			$(function ()
			{
				var stageCount = parseInt('<?php echo count($opportunityStageForm["stage_list"]);?>');

				var marWidth = stageCount * 5;

				var stageLiWidth = $('.opportunity-stage-li').width();

				<?php if(!$opportunityStageForm['stage_end']['value'] || !$isLoseCustomerAuth): ?>stageLiWidth = stageLiWidth + 110;<?php endif; ?>

				stageLiWidth = stageLiWidth - marWidth;

				var stageListWidth = (stageLiWidth - marWidth) / stageCount;

				$('.opportunity-stage-list').css('width',stageListWidth + 'px');

				$('.opportunity-stage-li').css('width',stageLiWidth + 'px');

				$('.opportunity-stage-btn').click(function ()
				{
					var value = $(this).data('value');

					var opportunity_id = "<?php echo encrypt($opportunity['opportunity_id'],'OPPORTUNITY');?>";

					layer.confirm('<?php echo L("MODIFY_THE_OPPORTUNITY_STAGE_TO");?> <span class="orange">'+value+'</span> ?',{icon: 3, offset:['100px']},function()
					{
						$.ajax({
							url:"<?php echo U('AjaxRequest/updateOpportunityStage');?>",
							type:'get',
							data:{'stage':value,'opportunity_id':opportunity_id},
							async: false,
							datatype:'json',
							success:function(data)
							{
								if(data.status == 2)
								{
									layer.msg(data.msg,{icon:1,time:1000,offset:['100px']},function()
									{
										window.location.reload();
									});
								}
								else
								{
									layer.msg(data.msg,{icon:2,time:1500,offset:['100px']});
								}
							},
							error:function()
							{
								layer.msg("<?php echo L('FAILED_TO_MODIFY_OPPORTUNITY_STAGE');?>");
							}
						});
					});
				})
			});

		</script>

		<div class="form-nav" >

			<ul>

				<?php if(!empty($isDetailAuthView)): ?><li><a href="<?php echo U('opportunity/detail',['id'=>encrypt($opportunity['opportunity_id'],'OPPORTUNITY'),'detailtype'=>encrypt('index','OPPORTUNITY'),'detail_source'=>$detail_source]);?>" class="form-tab <?php if(($detailtype) == "index"): ?>active<?php endif; ?>"><?php echo L('OPPORTUNITY_DETAILS');?></a></li><?php endif; ?>

				<?php if(!empty($isProductAuthView)): ?><li><a href="<?php echo U('opportunity/detail',['id'=>encrypt($opportunity['opportunity_id'],'OPPORTUNITY'),'detailtype'=>encrypt('product','OPPORTUNITY'),'detail_source'=>$detail_source]);?>" class="form-tab <?php if(($detailtype) == "product"): ?>active<?php endif; ?>"><?php echo L('PRODUCT_DETAILS');?></a></li><?php endif; ?>

				<?php if(($opportunity["isvalid"]) == "1"): if(!empty($isContractAuthView)): ?><li><a href="<?php echo U('opportunity/detail',['id'=>encrypt($opportunity['opportunity_id'],'OPPORTUNITY'),'detailtype'=>encrypt('contract','OPPORTUNITY'),'detail_source'=>$detail_source]);?>" class="form-tab <?php if(($detailtype) == "contract"): ?>active<?php endif; ?>"><?php echo L('CONTRACT');?>(<?php echo ($contractCount); ?>)</a></li><?php endif; endif; ?>

				<div class="clear"></div>

			</ul>

		</div>

        <!--<?php echo L('CUSTOMER_DETAIL');?>-->

		<div style="height: calc(100% - 283px);" class="form-content form-content1 <?php if(!in_array(($detailtype), explode(',',"index,follow,analysis"))): ?>hidden<?php endif; ?>">

			<div class="form-item pb25 pt20">

				<div class="layui-form-item mb10 wd50 fl">

					<label class="layui-form-label"><?php echo L('OPPORTUNITY_NO');?></label>

					<div class="layui-input-inline"><?php echo ($opportunity["opportunity_prefix"]); echo ($opportunity["opportunity_no"]); ?></div>

					<div class="clear"></div>

				</div>

				<div class="layui-form-item mb10 wd50 fl">

					<label class="layui-form-label"><?php echo L('OWNED_CUSTOMER');?></label>

					<div class="layui-input-inline blue8"><a mini='customer' data-id="<?php echo (encrypt($opportunity["customer_id"],'CUSTOMER')); ?>" data-type="detailPop" class="blue8 cursor" ><?php echo ($customer['detail']['name']); ?></a></div>

					<div class="clear"></div>

				</div>

				<?php if(is_array($opportunityform)): $i = 0; $__LIST__ = $opportunityform;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vo): $mod = ($i % 2 );++$i;?><!-- 字段未设置查看范围或当前用户角色在查看范围内 -->
				<?php if(!$vo['role_id'] || in_array($index['role_id'],explode(',',$vo['role_id']))): if(($vo["form_name"]) != "stage"): ?><div class="layui-form-item mb10 wd50 fl">

							<label class="layui-form-label"><?php echo ($vo["form_description"]); ?></label>

							<div class="layui-input-inline"><?php echo ((isset($opportunity['detail'][$vo['form_name']]) && ($opportunity['detail'][$vo['form_name']] !== ""))?($opportunity['detail'][$vo['form_name']]):'--'); ?></div>

							<div class="clear"></div>

						</div><?php endif; endif; endforeach; endif; else: echo "" ;endif; ?>

				<?php if(is_array($opportunityform2)): $i = 0; $__LIST__ = $opportunityform2;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vo): $mod = ($i % 2 );++$i;?><!-- 字段未设置查看范围或当前用户角色在查看范围内 -->
				<?php if(!$vo['role_id'] || in_array($index['role_id'],explode(',',$vo['role_id']))): ?><div class="layui-form-item mb10 wd100 layui-form-item-textarea fl">

						<label class="layui-form-label">

							<?php echo ($vo["form_description"]); ?>

						</label>

						<div class="layui-input-inline textareaImg">

							<?php echo ((isset($opportunity['detail'][$vo['form_name']]) && ($opportunity['detail'][$vo['form_name']] !== ""))?($opportunity['detail'][$vo['form_name']]):'--'); ?>

						</div>

						<div class="clear"></div>

					</div><?php endif; endforeach; endif; else: echo "" ;endif; ?>

				<div class="clear"></div>

			</div>


			<div class="form-nav pd0" id="customer-detail-nav">

				<ul>

					<?php if(($opportunity["isvalid"]) == "1"): if(!empty($isFollowAuthView)): ?><li><a href="javascript:void(0);" onclick="switchCustomerContent(this,1)" <?php if(($detailtype) == "index"): ?>class="active"<?php endif; ?>><?php echo L('CONTACT_RECORD');?></a></li>

							<li><a href="javascript:void(0);" onclick="switchCustomerContent(this,9)" ><?php echo L('ATTACHMENT');?></a></li><?php endif; ?>

						<li><a href="javascript:void(0);" onclick="switchCustomerContent(this,2)" <?php if(empty($isFollowAuthView)): ?>class="active"<?php endif; ?>><?php echo L('OPERATION_RECORD');?></a></li>

						<li><a href="javascript:void(0);" onclick="switchCustomerContent(this,3)" <?php if(($detailtype) == "analysis"): ?>class="active"<?php endif; ?>><?php echo L('OPPORTUNITY_ANALYSIS');?></a></li>

						<li><a href="javascript:void(0);" onclick="switchCustomerContent(this,4)"><?php echo L('COMPETITOR');?></a></li>

						<?php else: ?>

						<li><a href="javascript:void(0);" onclick="switchCustomerContent(this,2)" class="active"><?php echo L('OPERATION_RECORD');?></a></li><?php endif; ?>

				</ul>

			</div>

			<?php if(($opportunity["isvalid"]) == "1"): if(!empty($isFollowAuthView)): ?><!--<?php echo L('CONTACT_RECORD');?>-->
					<div class="customerDetailContent <?php if(($detailtype) != "index"): ?>hidden<?php endif; ?>" id="customer-detail-content1">

						<div class="form-content">

							<div class="layui-tab-content pb0 follow-default">

								<div class="layui-tab-item layui-show ">

									<div class="form-item">

										<div class="layui-form-item">

											<div class="layui-input-inline wd100">

												<input type="text" class="layui-input" placeholder="<?php echo L('ADD_CONTACT_RECORD');?>" name="" id="follow-entry">

											</div>

										</div>

									</div>

								</div>

							</div>

							<div class="layui-tab-content pb0 follow-tocreate hidden">

								<form action="<?php echo U('customer/create_follow',['id'=>encrypt($opportunity['opportunity_id'],'OPPORTUNITY'),'detailtype'=>encrypt('index','OPPORTUNITY'),'sourcetype'=>'opportunity']);?>" class="layui-form" method="post" enctype="multipart/form-data">

									<?php echo W('Follow/createFollow');?>

								</form>

							</div>

							<div class="feelcrm-follow">

								<?php echo W('Follow/followList',[$follow,$opportunity]);?>

							</div>

						</div>

						<script>

							$(function(){

								$('#follow-entry').click(function(){

									$('.follow-default').addClass('hidden');

									$('.follow-tocreate').show();

								})
							})

						</script>

						<script type="text/javascript">

							$(function()
							{
								layui.use(['layedit','form'], function()
								{
									var layedit = layui.layedit;

									var commentEditor = layedit.build('commentEditor',{hideTool:['strong','italic','underline','del','|','left','center','right','link','unlink','image','help'], height:120});

									$('.reply-comment,.comment-close').on('click',function()
									{
										$("#comment,.comment-shade").fadeToggle();

										var value = $(this).data('value');

										if(value != undefined)
										{
											$('#commentFollowId').val(value);
										}

										$('.submit-comment a').unbind('click').on('click',function()
										{
											layedit.sync(commentEditor);

											layer.load(2,{offset:['150px']});

											$.post("<?php echo U('Customer/commentFollow');?>",$('#commentForm').serialize(),function(data)
											{
												if(data.errcode == 0)
												{
													layer.msg(data.msg,{icon:1,time:1000,offset:['150px']},function()
													{
														window.location.reload();
													});
												}
												else
												{
													layer.closeAll('loading');

													layer.msg(data.msg,{icon:2,time:1500,offset:['150px']});
												}
											},'JSON')
										})
									})
								});

								$('.comment-more').on('click',function()
								{
									$(this).siblings('.comment-item:gt(2)').slideToggle('fast');

									$(this).find('i').toggleClass('icon-upward');
								});
							})

						</script>

					</div>

					<div class="customerDetailContent hidden" id="customer-detail-content9">

						<div class="feelcrm-follow border-none followContent" >

							<?php echo W('Follow/fileList',[$files]);?>

						</div>

					</div><?php endif; ?>

				<div class="customerDetailContent <?php if(!empty($isFollowAuthView)): ?>hidden<?php endif; ?>" id="customer-detail-content2">

					<!--<div class="form-item pb10 pt20">

						<div class="layui-form-item mb10 wd50 fl">

							<label class="layui-form-label">

								<?php echo L('SUBORDINATE_SECTOR');?>

							</label>

							<div class="layui-input-inline">

								<?php echo CrmgetMemberGroupName($groupList,$opportunity['group_id']);?>

							</div>

							<div class="clear"></div>

						</div>

						<div class="layui-form-item mb10 wd50 fl">

							<label class="layui-form-label">

								<?php echo L('LEADER');?>

							</label>

							<div class="layui-input-inline blue6">

								<?php echo ($opportunity["member_name"]); ?>

							</div>

							<div class="clear"></div>

						</div>

						<div class="layui-form-item mb10 wd50 fl">

							<label class="layui-form-label">

								<?php echo L('FOUNDER');?>

							</label>

							<div class="layui-input-inline">

								<?php echo ($opportunity["creater_name"]); ?>

							</div>

							<div class="clear"></div>

						</div>

						<div class="layui-form-item mb10 wd50 fl">

							<label class="layui-form-label">

								<?php echo L('CREATE_TIME');?>

							</label>

							<div class="layui-input-inline">

								<?php echo (getDates($opportunity["createtime"])); ?>

							</div>

							<div class="clear"></div>

						</div>

						<div class="clear"></div>

					</div>
-->
					<?php if(!empty($lose_log)): ?><div class="item-list wd100 pl0 pr0 mt15 border_b">

							<table class="layui-table mar0" lay-skin="line">

								<thead>

								<tr>

									<th class="common_con_th"><?php echo L('REASON_FOR_LOSS');?></th><th class="common_con_th"><?php echo L('COMPETITOR');?></th><th><?php echo L('OPERATOR');?></th><th><?php echo L('TIME');?></th>

								</tr>

								</thead>

								<tbody>

								<?php if(is_array($lose_log)): $i = 0; $__LIST__ = $lose_log;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vo): $mod = ($i % 2 );++$i;?><tr>

										<td class="common_con_td" title="<?php echo ($vo["lose_name"]); ?>"><?php echo ($vo["lose_name"]); ?></td>

										<td class="common_con_td" title="<?php echo ($vo["competitor_name"]); ?>"><?php echo ($vo["competitor_name"]); ?></td>

										<td><?php echo ($vo["operator_name"]); ?></td>

										<td><?php echo (getDates($vo["createtime"])); ?></td>
									</tr><?php endforeach; endif; else: echo "" ;endif; ?>

								</tbody>

							</table>

						</div><?php endif; ?>

					<div class="operate-info" id="CrmLogBox">


					</div>

					<script>

						layui.use('flow', function()
						{
							var flow = layui.flow;

							flow.load(
									{
										elem: '#CrmLogBox',
										scrollElem:'.feeldesk-main',
										isAuto:false,
										done: function(page, next)
										{
											var url = "<?php echo (ACTION_NAME); ?>";

											var opportunity_id = "<?php echo encrypt($opportunity['opportunity_id'],'OPPORTUNITY');?>";

											var detailtype = "<?php echo encrypt($detailtype,'OPPORTUNITY');?>";

											var lis = [];

											$.get("<?php echo U('opportunity/'.ACTION_NAME);?>?id="+opportunity_id+"&detailtype="+detailtype+"&p="+page+"&request=crmlog", function(data)
											{
												if(data.data.length > 0)
												{
													layui.each(data.data, function(index, item)
													{
														var items ='<div class="operate-list">';

														if(item.member.face)
														{
															items += '<img src="' + item.member.face + '" alt="">';
														}
														else
														{
															items += '<img src="/Attachs/face/face.png" alt="">';
														}
														items += '&nbsp;&nbsp;&nbsp;<span class="blue8">'+item.member.name+'</span>';

														items += '<span class="gray9 fts12">&nbsp;• '+item.createtime+'&nbsp;</span>';

														items += '<span>'+item.content+'</span>';

														items += '</div>';

														lis.push(items);
													});

													next(lis.join(''), page < data.pages);
												}
												else
												{
													var items = "";

													lis.push(items);

													next(lis.join(''), page < data.pages);
												}
											});

										}
									});
						});

					</script>

				</div>

				<div class="customerDetailContent <?php if(($detailtype) != "analysis"): ?>hidden<?php endif; ?>" id="customer-detail-content3">

					<div class="form-item pb25 pt10">

						<div class="wd100"></div>

						<form class="layui-form" action="<?php echo U('opportunity/edit_analysis',['id'=>encrypt($analysis['analysis_id'],'OPPORTUNITY'),'opportunity_id'=>encrypt($opportunity['opportunity_id'],'OPPORTUNITY'),'detailtype'=>encrypt('analysis','OPPORTUNITY'),'detail_source'=>$detail_source]);?>">

							<?php if(!empty($isEditAnalysisAuth)): ?><a href="javascript:" class="feelcrm-commbtn fr edit-customer-detail" ><?php echo L('EDITOR');?></a>

								<a href="javascript:" class="feelcrm-commbtn fr finish-customer-detail" ><?php echo L('COMPLETE');?></a><?php endif; ?>

							<div class="clear"></div>

							<?php if(is_array($analysisform)): $i = 0; $__LIST__ = $analysisform;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vo): $mod = ($i % 2 );++$i;?><!-- 字段未设置查看范围或当前用户角色在查看范围内 -->
							<?php if(!$vo['role_id'] || in_array($index['role_id'],explode(',',$vo['role_id']))): ?><div class="layui-form-item mb10 wd50 fl">

									<label class="layui-form-label"><?php echo ($vo["form_description"]); ?></label>

									<div class="layui-input-inline <?php if(!empty($isEditAnalysisAuth)): ?>pd0 detail-update-form<?php endif; ?>">

										<div class="layui-detail-edit-default" >

											<?php echo ((isset($analysis['detail'][$vo['form_name']]) && ($analysis['detail'][$vo['form_name']] !== ""))?($analysis['detail'][$vo['form_name']]):'--'); ?>

										</div>

										<?php if(!empty($isEditAnalysisAuth)): ?><div class="hidden layui-detail-edit-form">

												<?php if(($vo["form_type"]) == "date"): $ft++; endif; ?>

												<?php if(($vo["form_type"]) == "region"): $reg++; endif; ?>

												<?php $t++; ?>

												<?php echo W('Update/updateFormContent',[$analysis,$analysis['analysis_id'],$vo,'analysis',$t,$ft,$reg]);?>

											</div>

											<i class="i-update-success iconfont icon-system-success hidden"></i><?php endif; ?>

									</div>

									<div class="clear"></div>

								</div>

							<?php else: ?>

								<?php if(($vo["form_type"]) == "region"): ?><input type="hidden" name="analysis_form[<?php echo ($vo["form_name"]); ?>_defaultCountry]" value="<?php echo ($analysis[$vo['form_name']]['defaultCountry']); ?>" >
									<input type="hidden" name="analysis_form[<?php echo ($vo["form_name"]); ?>_defaultProv]" value="<?php echo ($analysis[$vo['form_name']]['defaultProv']); ?>" >
									<input type="hidden" name="analysis_form[<?php echo ($vo["form_name"]); ?>_defaultCity]" value="<?php echo ($analysis[$vo['form_name']]['defaultCity']); ?>" >
									<input type="hidden" name="analysis_form[<?php echo ($vo["form_name"]); ?>_defaultArea]" value="<?php echo ($analysis[$vo['form_name']]['defaultArea']); ?>" >

									<?php else: ?>

									<input type="hidden" name="analysis_form[<?php echo ($vo["form_name"]); ?>]" value="<?php echo ($analysis['detail'][$vo['form_name']]); ?>" ><?php endif; endif; endforeach; endif; else: echo "" ;endif; ?>

							<?php if(is_array($analysisform2)): $i = 0; $__LIST__ = $analysisform2;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vo): $mod = ($i % 2 );++$i;?><!-- 字段未设置查看范围或当前用户角色在查看范围内 -->
							<?php if(!$vo['role_id'] || in_array($index['role_id'],explode(',',$vo['role_id']))): ?><div class="layui-form-item mb10 wd100 layui-form-item-textarea fl">

									<label class="layui-form-label">

										<?php echo ($vo["form_description"]); ?>

									</label>

									<div class="layui-input-inline <?php if(!empty($isEditAnalysisAuth)): ?>pd0 detail-update-form<?php endif; ?>">

										<div class="layui-detail-edit-default textareaImg">

											<?php echo ((isset($analysis['detail'][$vo['form_name']]) && ($analysis['detail'][$vo['form_name']] !== ""))?($analysis['detail'][$vo['form_name']]):'--'); ?>

										</div>

										<?php if(!empty($isEditAnalysisAuth)): $tx++; ?>

											<div class="hidden layui-detail-edit-form">

												<textarea class="layui-textarea layui-hide ticket-textarea" name="analysis_form[<?php echo ($vo["form_name"]); ?>]" id="crmEditor<?php echo $tx; ?>"><?php echo ($analysis['detail'][$vo['form_name']]); ?></textarea>

											</div>

											<i class="i-update-success iconfont icon-system-success hidden"></i>

											<script>

												layui.use(['layedit'],function()
												{
													var layedit = layui.layedit;

													crmEditor<?php echo ($tx); ?> = layedit.build('crmEditor<?php echo ($tx); ?>',{uploadImage: {url:"/"+moduleName+"/Upload/uploadImageFile?type=editor", type: 'post'},hideTool:['face'],height:200});

													$('.submit-textarea').click(function()
													{
														var content = layedit.getContent(crmEditor<?php echo ($tx); ?>);

														updateFormContentAjax('<?php echo U("AjaxRequest/updateFormContent");?>','<?php echo ($analysis["analysis_id"]); ?>','analysis',content,'<?php echo ($vo["form_name"]); ?>',$('textarea[name="analysis_form[<?php echo ($vo["form_name"]); ?>]"]'),'textarea');
													})

												})

											</script><?php endif; ?>

									</div>

									<div class="clear"></div>

								</div>

							<?php else: ?>

								<input type="hidden" name="analysis_form[<?php echo ($vo["form_name"]); ?>]" value="<?php echo ($analysis['detail'][$vo['form_name']]); ?>" ><?php endif; endforeach; endif; else: echo "" ;endif; ?>


							<div class="clear"></div>

						</form>

					</div>

				</div>

				<!--<?php echo L('COMPETITOR');?>-->
				<div class="customerDetailContent hidden" id="customer-detail-content4">

					<div class="pt20 pb15" >

						<?php echo FEELCRM('Opportunity/create_competitor',['id'=>encrypt($opportunity['opportunity_id'],'OPPORTUNITY'),'detailtype'=>encrypt('index','OPPORTUNITY')],L('ADD_COMPETITOR'),'feelcrm-commbtn');?>

					</div>

					<div class="item-list wd100 pl0 pr0 border_t">

						<table class="layui-table mar0" lay-skin="line">

							<thead>

							<tr>

								<th><?php echo L('COMPETITOR_NAME');?></th><th><?php echo L('OPPOSING_STAGE');?></th><th class="follow_con_th"><?php echo L('ADVANTAGE');?></th><th class="follow_con_th"><?php echo L('DISADVANTAGE');?></th><th><?php echo L('OPERATION');?></th>

							</tr>

							</thead>

							<tbody>
							<?php if(empty($competitor)): ?><tr class="nodata center">

									<td colspan="11">

										<p><i class="iconfont icon-nothing fts20"></i></p>

										<p><?php echo L('NO_DATA');?></p>

									</td>

								</tr>

								<?php else: ?>

								<?php if(is_array($competitor)): $i = 0; $__LIST__ = $competitor;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vo): $mod = ($i % 2 );++$i;?><tr>

										<td><?php echo ($vo["detail"]["name"]); ?></td>

										<td><?php echo ($vo["detail"]["stage"]); ?></td>

										<td class="follow_con_td" title="<?php echo ($vo["detail"]["advantage"]); ?>"><?php echo ($vo["detail"]["advantage"]); ?></td>

										<td class="follow_con_td" title="<?php echo ($vo["detail"]["inferiority"]); ?>"><?php echo ($vo["detail"]["inferiority"]); ?></td>

										<td class="listOperate">

											<i class="iconfont icon-dian"></i>

											<div class="operate hidden">

												<?php echo FEELCRM('Opportunity/edit_competitor',['id'=>encrypt($vo['competitor_id'],'OPPORTUNITY'),'opportunity_id'=>encrypt($opportunity['opportunity_id'],'OPPORTUNITY'),'detailtype'=>encrypt('index','OPPORTUNITY'),'detail_source'=>$detail_source],L('EDITOR'));?>

												<?php echo FEELCRM('Opportunity/delete_competitor',['id'=>encrypt($vo['competitor_id'],'OPPORTUNITY'),'detailtype'=>encrypt('index','OPPORTUNITY')],L('DELETE'),'','async');?>

											</div>

										</td>

									</tr><?php endforeach; endif; else: echo "" ;endif; endif; ?>

							</tbody>

						</table>

						<div class="mt20">


						</div>

					</div>

				</div>

			<?php else: ?>

				<div class="customerDetailContent" id="customer-detail-content2">

					<!--<div class="form-item pb10 pt20">

						<div class="layui-form-item mb10 wd50 fl">

							<label class="layui-form-label">

								<?php echo L('SUBORDINATE_SECTOR');?>

							</label>

							<div class="layui-input-inline">

								<?php echo CrmgetMemberGroupName($groupList,$opportunity['group_id']);?>

							</div>

							<div class="clear"></div>

						</div>

						<div class="layui-form-item mb10 wd50 fl">

							<label class="layui-form-label">

								<?php echo L('LEADER');?>

							</label>

							<div class="layui-input-inline blue6">

								<?php echo ($opportunity["member_name"]); ?>

							</div>

							<div class="clear"></div>

						</div>

						<div class="layui-form-item mb10 wd50 fl">

							<label class="layui-form-label">

								<?php echo L('FOUNDER');?>

							</label>

							<div class="layui-input-inline">

								<?php echo ($opportunity["creater_name"]); ?>

							</div>

							<div class="clear"></div>

						</div>

						<div class="layui-form-item mb10 wd50 fl">

							<label class="layui-form-label">

								<?php echo L('CREATE_TIME');?>

							</label>

							<div class="layui-input-inline">

								<?php echo (getDates($opportunity["createtime"])); ?>

							</div>

							<div class="clear"></div>

						</div>

						<div class="clear"></div>

					</div>-->

					<?php if(!empty($lose_log)): ?><div class="item-list wd100 pl0 pr0 mt15 border_b">

							<table class="layui-table mar0" lay-skin="line">

								<thead>

								<tr>

									<th class="common_con_th"><?php echo L('REASON_FOR_LOSS');?></th><th class="common_con_th"><?php echo L('COMPETITOR');?></th><th><?php echo L('OPERATOR');?></th><th><?php echo L('TIME');?></th>

								</tr>

								</thead>

								<tbody>

								<?php if(is_array($lose_log)): $i = 0; $__LIST__ = $lose_log;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vo): $mod = ($i % 2 );++$i;?><tr>

										<td class="common_con_td" title="<?php echo ($vo["lose_name"]); ?>"><?php echo ($vo["lose_name"]); ?></td>

										<td class="common_con_td" title="<?php echo ($vo["competitor_name"]); ?>"><?php echo ($vo["competitor_name"]); ?></td>

										<td><?php echo ($vo["operator_name"]); ?></td>

										<td><?php echo (getDates($vo["createtime"])); ?></td>
									</tr><?php endforeach; endif; else: echo "" ;endif; ?>

								</tbody>

							</table>

						</div><?php endif; ?>

					<div class="operate-info" id="CrmLogBox">


					</div>

					<script>

						layui.use('flow', function()
						{
							var flow = layui.flow;

							flow.load(
									{
										elem: '#CrmLogBox',
										scrollElem:'.feeldesk-main',
										isAuto:false,
										done: function(page, next)
										{
											var url = "<?php echo (ACTION_NAME); ?>";

											var opportunity_id = "<?php echo encrypt($opportunity['opportunity_id'],'OPPORTUNITY');?>";

											var detailtype = "<?php echo encrypt($detailtype,'OPPORTUNITY');?>";

											var lis = [];

											$.get("<?php echo U('opportunity/'.ACTION_NAME);?>?id="+opportunity_id+"&detailtype="+detailtype+"&p="+page+"&request=crmlog", function(data)
											{
												if(data.data.length > 0)
												{
													layui.each(data.data, function(index, item)
													{
														var items ='<div class="operate-list">';

														if(item.member.face)
														{
															items += '<img src="' + item.member.face + '" alt="">';
														}
														else
														{
															items += '<img src="/Attachs/face/face.png" alt="">';
														}
														items += '&nbsp;&nbsp;&nbsp;<span class="blue8">'+item.member.name+'</span>';

														items += '<span class="gray9 fts12">&nbsp;• '+item.createtime+'&nbsp;</span>';

														items += '<span>'+item.content+'</span>';

														items += '</div>';

														lis.push(items);
													});

													next(lis.join(''), page < data.pages);
												}
												else
												{
													var items = "";

													lis.push(items);

													next(lis.join(''), page < data.pages);
												}
											});

										}
									});
						});

					</script>

				</div><?php endif; ?>

        </div>


		<div style="height: calc(100% - 283px);" class="form-content form-content5 <?php if(($detailtype) != "product"): ?>hidden<?php endif; ?>"> <!--产品-->

			<div class="item-list wd100">

				<table class="layui-table" lay-skin="line">

					<thead>

						<tr>

							<th><?php echo L('PRODUCT_CATEGORY');?></th><th><?php echo L('IMAGES');?></th><th><?php echo L('PRODUCT_NAME');?></th><th><?php echo L('PRODUCT_NUM');?></th><th><?php echo L('PRICE');?></th>

						</tr>

					</thead>

					<tbody>

						<?php if(empty($product)): ?><tr class="nodata center">

								<td colspan="11">

									<p><i class="iconfont icon-nothing fts20"></i></p>

									<p><?php echo L('NO_DATA');?></p>

								</td>

							</tr>

						<?php else: ?>

							<?php if(is_array($product)): $i = 0; $__LIST__ = $product;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vo): $mod = ($i % 2 );++$i;?><tr>

									<td><?php echo ($vo["type_name"]); ?></td>

									<td><img src="<?php echo ((isset($vo["product_img"]) && ($vo["product_img"] !== ""))?($vo["product_img"]):'/Public/crm/img/default_pro.png'); ?>" width="40" height="40" /></td>

									<td><?php echo ($vo["detail"]["name"]); ?></td>

									<td><?php echo ($vo["detail"]["product_num"]); ?></td>

									<td><?php echo ($vo["detail"]["list_price"]); ?></td>

								</tr><?php endforeach; endif; else: echo "" ;endif; endif; ?>

					</tbody>

				</table>

				<div class="right-list-page clearfix"><div class="feeldesk-page"><?php echo ($page); ?></div></div>

			</div>

		</div>

		<?php if(($opportunity["isvalid"]) == "1"): ?><div style="height: calc(100% - 283px);" class="form-content form-content3 <?php if(($detailtype) != "contract"): ?>hidden<?php endif; ?>"> <!--合同-->

				<div class="item-list feelcrm-list layui-form wd100">

					<table class="layui-table" lay-skin="line">

						<thead>

						<tr>

							<th><?php echo L('CONTRACT_NO');?></th>

							<?php if(is_array($formList)): $i = 0; $__LIST__ = $formList;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vo): $mod = ($i % 2 );++$i;?><!-- 字段未设置查看范围或当前用户角色在查看范围内 -->
								<?php if(!$vo['role_id'] || in_array($index['role_id'],explode(',',$vo['role_id']))): ?><th><?php echo ($vo["form_description"]); ?></th><?php endif; endforeach; endif; else: echo "" ;endif; ?>

							<th><?php echo L('LEADER');?></th>

							<th><?php echo L('CREATE_TIME');?></th>

						</tr>

						</thead>

						<tbody>

						<?php if(empty($contract)): ?><tr class="nodata center">

								<td colspan="11">

									<p><i class="iconfont icon-nothing fts20"></i></p>

									<p><?php echo L('NO_DATA');?></p>

								</td>

							</tr>

							<?php else: ?>

							<?php if(is_array($contract)): $i = 0; $__LIST__ = $contract;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vo): $mod = ($i % 2 );++$i;?><tr data-id="<?php echo (encrypt($vo["contract_id"],'CONTRACT')); ?>" data-type="detailPop">

									<td mini='contract'><?php echo ($vo["contract_prefix"]); echo ($vo["contract_no"]); ?></td>

									<?php if(is_array($formList)): $i = 0; $__LIST__ = $formList;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$v): $mod = ($i % 2 );++$i;?><!-- 字段未设置查看范围或当前用户角色在查看范围内 -->
										<?php if(!$v['role_id'] || in_array($index['role_id'],explode(',',$v['role_id']))): ?><td mini='contract' <?php if(($v["form_type"]) == "textarea"): ?>title="<?php echo (strip_tags($vo['detail'][$v['form_name']])); ?>"<?php endif; ?> <?php if(($v["form_name"]) == "price"): ?>class="red"<?php endif; ?>><?php if(($v["form_type"]) == "textarea"): echo mb_substr(strip_tags($vo['detail'][$v['form_name']]),0,20);?>...<?php else: echo ($vo['detail'][$v['form_name']]); endif; ?></td><?php endif; endforeach; endif; else: echo "" ;endif; ?>

									<td mini='contract'><?php echo ($vo["member_name"]); ?></td>

									<td mini='contract' >

										<?php echo (date("Y-m-d H:i:s",$vo["createtime"])); ?>

									</td>

								</tr><?php endforeach; endif; else: echo "" ;endif; endif; ?>

						</tbody>

					</table>

					<div class="right-list-page clearfix"><div class="feeldesk-page"><?php echo ($page); ?></div></div>

				</div>

			</div><?php endif; ?>

	</div>

</div>

<script type="text/javascript">

	$('body').find('#closeCustomerDetail').click(function()
	{
		window.parent.postMessage('closeDetail','*');
	});

	window.addEventListener('message', function(e)
	{
		if(e.data)
		{
			window.formCustomer = 1;
		}
	}, false)
	
	$(function(){
		
		var Awidth = $('.form-nav').width();
	
		var linum = $('.form-nav ul').children("li").length;
		
		var liwidth = 130 * linum;
		
		if(Awidth > liwidth)
		{
			$('.form-nav ul').css('min-width',Awidth+'px');
		}
		else
		{
			$('.form-nav ul').css('min-width',liwidth+'px');
		}
		
	})
	
</script>

<script type="text/javascript" src="/Public/js/submitform.js"></script>
<script type="text/javascript">
	
	layui.use('form',function()
	{
		var form = layui.form;
		
		form.render('checkbox');
		
		form.render('radio');
		
		form.render('select');

	})
	
</script>



    </div>

    <script type="text/javascript">

        layer.ready(function()
        {
            layer.photos({
                photos: '.textareaImg',
                shift: 5,
                shade: [0.8, 'rgba(0,0,0,.8)']
            });

        })

    </script>

    <script>

        //客户端
        /*if ( navigator.userAgent.toLowerCase().indexOf('electron/') > -1)
        {
            top.setIframe(document);
        }*/
    </script>

    </body>

</html>